package java_thinking.unit_19._19_11;

import java_thinking.net.mindview.util.Enums;

/**
 * @Desc:
 * @author: cww
 * @DateTime: 2019/5/24 19:30
 */

public class RoShamBo {
    public static <T extends Competitor<T>> void match(T a, T b) {
        System.out.println(a + " vs " + b + " : " + a.compete(b));
    }
    public static <T extends Enum<T> & Competitor<T>> void play(Class<T> rsbClass, int size) {
        for (int i = 0; i < size; i++) {
            match(Enums.random(rsbClass),Enums.random(rsbClass));
        }
    }
}
